﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RoboCoder.GameState;

// NOTE: If you change the interface name "IRobozzleService" here, you must also update the reference to "IRobozzleService" in Web.config.
[ServiceContract]
public interface IRobozzleService
{
    [OperationContract]
    LevelInfo[] GetLevels(int levelId, out Dictionary<int,int> commentCounts);

    [OperationContract]
    LevelInfo[] GetLevels2(out Dictionary<int, int> commentCounts);

    [OperationContract]
    string SubmitLevel(LevelInfo level, string userName, string pwd, string solution, out int levelId);

    [OperationContract]
    bool LogIn(string userName, string password, out int[] solvedLevels, out LevelVoteInfo[] votes);

    [OperationContract]
    string SubmitSolution(int levelId, string userName, string password, string solution);

    [OperationContract]
    string RegisterUser(string userName, string password, string email, int[] solvedLevels);

    [OperationContract]
    string RegisterUser2(string userName, string password, string email, Dictionary<int,string> solvedLevels);

    [OperationContract]
    void GetTopSolvers(out string[] names, out int[] solved);

    [OperationContract]
    void Internal();

    [OperationContract]
    void SubmitLevelVote(string userName, string password, int levelId, int vote0, int vote1);

    [OperationContract]
    void GetLevelVotes(out int[] votes, out int[] kinds);

    [OperationContract]
    void SubmitComment(string userName, string password, int puzzleId, string comment, string ipAddress);

    [OperationContract]
    void GetTopSolvers2(out string[] names, out int[] solved, out string[] namesToday, out int[] solvedToday);
}
